Package com.cisco.pt.ipc.sim.impl
Class MACSwitchImpl
java.lang.Object
com.cisco.pt.ipc.impl.IPCObjectImpl
com.cisco.pt.ipc.sim.impl.ProcessImpl
com.cisco.pt.ipc.sim.impl.MACSwitchImpl
Information provided by the PKI file:
\class MacSwitch
\brief MacSwitch handles and manipulates the MAC address table.
\example network().getDevice("Switch0").getProcess("MacSwitcher")
- Author:
- Auto-generated
-
Field Summary
Fields inherited from class com.cisco.pt.ipc.impl.IPCObjectImpl
accessMessage, ipcFactory, packetTracerSession -
Constructor Summary
ConstructorsConstructorDescriptionMACSwitchImpl(IPCFactory ipcFactory, PacketTracerSession packetTracerSession, IPCMessageLTV accessMessage) -
Method Summary
Modifier and TypeMethodDescriptionbooleanaddStaticMac(MACAddress macAddress, int vlanNumber, String portName) Information provided by the PKI file:getGlobalMacAt(int index) Information provided by the PKI file:intInformation provided by the PKI file:booleanisEntryExisted(MACAddress macAddress, int vlanNumber, String portName) Information provided by the PKI file:booleanportExistedInStatic(String portName) Information provided by the PKI file:booleanremoveStaticMac(MACAddress macAddress, int vlanNumber, String portName) Information provided by the PKI file:Methods inherited from class com.cisco.pt.ipc.sim.impl.ProcessImpl
getOwnerDeviceMethods inherited from class com.cisco.pt.ipc.impl.IPCObjectImpl
getAccessMessage, getClassName, getFactory, getObjectUUID, getPacketTracerSession, sendMessage, sendMessageWithReturn, translateToCommandStatusStringPairMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.cisco.pt.ipc.IPCObject
getAccessMessage, getClassName, getFactory, getObjectUUID, getPacketTracerSessionMethods inherited from interface com.cisco.pt.ipc.sim.Process
getOwnerDevice
-
Constructor Details
-
MACSwitchImpl
public MACSwitchImpl(IPCFactory ipcFactory, PacketTracerSession packetTracerSession, IPCMessageLTV accessMessage)
-
-
Method Details
-
addStaticMac
Information provided by the PKI file:
\brief Adds a static MAC address to the specified port. \param macAddress, the static MAC address. \param vlanNumber, the VLAN number. \param portName, portName can be one of the following plus a port number where appropriate: Console, Aux, Ethernet, FastEthernet, GigabitEthernet, Serial, Wireless, Loopback, Vlan, Modem, Coaxial, Rs232, Async. Example: FastEthernet0/0 \return bool, true if successful, otherwise false.- Specified by:
addStaticMacin interfaceMACSwitch- Parameters:
macAddress- Takes in a parameter of macAddressvlanNumber- Takes in a parameter of vlanNumberportName- Takes in a parameter of portName- Returns:
- boolean Returns a boolean
-
removeStaticMac
Information provided by the PKI file:
\brief Removes the static MAC address from the specified port. \param macAddress, the static MAC address of interest. \param vlanNumber, the VLAN number of interest. \param portName, portName can be one of the following plus a port number where appropriate: Console, Aux, Ethernet, FastEthernet, GigabitEthernet, Serial, Wireless, Loopback, Vlan, Modem, Coaxial, Rs232, Async. Example: FastEthernet0/0 \return bool, true if successful, otherwise false.- Specified by:
removeStaticMacin interfaceMACSwitch- Parameters:
macAddress- Takes in a parameter of macAddressvlanNumber- Takes in a parameter of vlanNumberportName- Takes in a parameter of portName- Returns:
- boolean Returns a boolean
-
getStaticMacCount
public int getStaticMacCount()Information provided by the PKI file:
\brief Returns the number of static MAC addresses configured. \return int, the number of static MAC addresses configured.- Specified by:
getStaticMacCountin interfaceMACSwitch- Returns:
- int Returns a int
-
getGlobalMacAt
Information provided by the PKI file:
\brief Returns the static MAC address at the specified index. \param index, the index of the static MAC address of interest. \return StaticMac, the StaticMac object at the specified index.- Specified by:
getGlobalMacAtin interfaceMACSwitch- Parameters:
index- Takes in a parameter of index- Returns:
- StaticMac Returns a StaticMac
-
portExistedInStatic
Information provided by the PKI file:
\param Returns true if the specified port has a static MAC address, otherwise false. \param portName, portName can be one of the following plus a port number where appropriate: Console, Aux, Ethernet, FastEthernet, GigabitEthernet, Serial, Wireless, Loopback, Vlan, Modem, Coaxial, Rs232, Async. Example: FastEthernet0/0 \return bool, true if the specified port has a static MAC address, otherwise false.- Specified by:
portExistedInStaticin interfaceMACSwitch- Parameters:
portName- Takes in a parameter of portName- Returns:
- boolean Returns a boolean
-
isEntryExisted
Information provided by the PKI file:
\brief Returns true if the specified entry exists in the MAC address table, otherwise false. \param macAddress, the static MAC address of interest. \param vlanNumber, the VLAN number of interest. \param portName, portName can be one of the following plus a port number where appropriate: Console, Aux, Ethernet, FastEthernet, GigabitEthernet, Serial, Wireless, Loopback, Vlan, Modem, Coaxial, Rs232, Async. Example: FastEthernet0/0 \return bool, true if the specified entry exists in the MAC address table, otherwise false.- Specified by:
isEntryExistedin interfaceMACSwitch- Parameters:
macAddress- Takes in a parameter of macAddressvlanNumber- Takes in a parameter of vlanNumberportName- Takes in a parameter of portName- Returns:
- boolean Returns a boolean
-